//
//  ICMSelecteStepInTimeView.h
//  ICrEAM
//
//  Created by rainimute on 16/11/2.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ICMTitleTextFeildView.h"
#import "ICMSelecteTimeModel.h"

@protocol ICMSelecteStepInTimeViewDelegate;
@interface ICMSelecteStepInTimeView : UIView


                            /*UI部分*/
@property (nonatomic, strong) ICMTitleTextFeildView *serviceAdvisorView;

@property (nonatomic, strong) ICMTitleTextFeildView *stepInTimeView;

@property (nonatomic, strong) UITableView *stepInTimeTableView;

@property (nonatomic, strong) UITableView *stationTableView;

@property (nonatomic, strong) UITableView *stationTitleTableView;

                            /*Data部分*/
/*服务顾问的预约详情model*/
@property (nonatomic, strong) ICMSelecteTimeModel *serverTimeModel;
/*工位的预约详情数组：预约详情model作为元素的数组*/
@property (nonatomic, strong) NSMutableArray *stationModels;
//预约的工位名称
@property (nonatomic, copy) NSString *selectedStationTitle;
//预约的工位编码
@property (nonatomic, copy) NSString *selectedStationCode;
//预计施工时间
@property (nonatomic, copy) NSString *workingHour;
//所有服务顾问的编码和姓名 : code:name
@property (nonatomic, strong) NSMutableDictionary *allServerNameAndCodes;

//用于判断是否在当前时间之后
@property (nonatomic, assign) NSInteger currentMinIndex;
//预约服务顾问的code
@property (nonatomic, copy) NSString *userId;
//预约工位code
@property (nonatomic, strong) NSString *stationCode;

@property (nonatomic, copy) NSString *RECEPTION_TIME;//预计接待时长
@property (nonatomic, copy) NSString *EST_STATION_TIME;//预计上工位时间

@property (nonatomic, copy) NSString *workTime;

@property (nonatomic, assign) BOOL isOnline;//VW是否有在线资源
@property (nonatomic, assign) BOOL isEditType;//SK是否编辑模式

- (instancetype)initWithFrame:(CGRect)frame andServer:(NSString*)serverCode andAppointmentDate:(NSString*)appointmentDate andReceptionTime:(NSString *)receptionTime andStationBeginTime:(NSString*)stationBeginTime andStationTime:(NSString*)stationTime andStationCode:(NSString*)stationCode andBackTarge:(UIView*)targe;

@property (weak, nonatomic) id<ICMSelecteStepInTimeViewDelegate> delegate;

//获取服务顾问可预约时间
- (void)getTimeDataWithData:(id)data WithDate:(NSString *)date;
//获得工位的可预约时间
- (void)getAllStationTimeDataWithData:(id)data;
//获得所有的服务顾问姓名和编码
- (void)getAllServerNameAndCodeWithData:(id)data;

@end

@protocol ICMSelecteStepInTimeViewDelegate <NSObject>

@optional
//获取服务顾问可预约时间
- (void)getTimeDataWithDate:(NSString *)date andUserId:(NSString *)userId;
//获得工位的可预约时间
- (void)getAllStationTimeDataWithDate:(NSString*)date;
//获得所有的服务顾问姓名和编码
- (void)getAllServerNameAndCode;


@end

